class Bank < ActiveRecord::Base
  belongs_to :editor, :class_name => 'Employee', :foreign_key => 'employee_id'

  scope :name_like, lambda { |name| { :conditions => ['name like ?', '%'+name+'%'],:include=>[:editor] }}

  scope :paginate, lambda { |start,limit| { :offset => start.to_i,:limit => limit.to_i,:order=>"id DESC" }}
end
